package com.taxshare.purchaser.remote;


import com.taxshare.response.beans.Response;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @ClassName: ManagerClientService
 * @Description: manager远程调用
 * @author: luozhongyi
 * @date: 2021/3/22 9:41
 */
@FeignClient(name = "tax-manager", fallback = ManagerClientService.ManagerClientServiceImpl.class)
@Component
public interface ManagerClientService {

    /**
     * 获取用户税号列表
     */
    @RequestMapping(value = "/commAuth/get/taxNumbers", method = RequestMethod.GET)
    Response<List<String>> getTaxNumbers(@RequestParam("userid") String userid,@RequestParam("userType") String userType);

    /**
     * 获取用户信息
     */
    @RequestMapping(value = "/user/getOne", method = RequestMethod.GET)
    Response<String> info(@RequestParam("loginName") String loginName );


    @Component
    class ManagerClientServiceImpl implements ManagerClientService {
        @Override
        public Response<List<String>> getTaxNumbers(String userid ,String userType) {
            return null;
        }
        @Override
        public Response<String> info(String userid) {
            return null;
        }
    }
}
